package com.foreknow.springboot_demo.threaddemo;

public class MyRunnable implements Runnable{
    @Override
    public void run() {
        for (int i=0; i<100;i++){
            System.out.println("子线程运行了"+i);
        }
    }

    public static void main(String[] args) {
        MyRunnable runnable = new MyRunnable();
        new Thread(runnable).start();
        for (int i=0; i<100;i++){
            System.out.println("猪线程运行了"+i);
        }

    }
}
